package cn.classLoader;


import java.sql.Date;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class MyClassLoader2 {
    //这是一个main方法,是程序的入口
    public static void main(String[] args) {
        ClassLoader classLoader = Object.class.getClassLoader();
        System.out.println(classLoader);//null

        //rt.jar包下的类
        ClassLoader classLoader1 = Date.class.getClassLoader();
        System.out.println(classLoader1);
        //null

        //dnsns.jar包下的类
        /*ClassLoader classLoader2 = DNSNameServiceDescriptor.class.getClassLoader();
        System.out.println(classLoader2);*/
        //sun.misc.Launcher$ExtClassLoader@6d6f6e28

        ClassLoader classLoader3 = MyClassLoader2.class.getClassLoader();
        System.out.println(classLoader3);
        //sun.misc.Launcher$AppClassLoader@18b4aac2

    }
}
